/*
 * @Author: your name
 * @Date: 2020-12-08 16:14:57
 * @LastEditTime: 2020-12-08 16:17:24
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /C20Driver/lib/model/plice_model.dart
 */
class PliceModel {
  int errorCode;
  String errorMsg;
  int logId;
  int timestamp;
  int cached;
  Result result;

  PliceModel(
      {this.errorCode,
      this.errorMsg,
      this.logId,
      this.timestamp,
      this.cached,
      this.result});

  PliceModel.fromJson(Map<String, dynamic> json) {
    errorCode = json['error_code'];
    errorMsg = json['error_msg'];
    logId = json['log_id'];
    timestamp = json['timestamp'];
    cached = json['cached'];
    result =
        json['result'] != null ? new Result.fromJson(json['result']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['error_code'] = this.errorCode;
    data['error_msg'] = this.errorMsg;
    data['log_id'] = this.logId;
    data['timestamp'] = this.timestamp;
    data['cached'] = this.cached;
    if (this.result != null) {
      data['result'] = this.result.toJson();
    }
    return data;
  }
}

class Result {
  double score;

  Result({this.score});

  Result.fromJson(Map<String, dynamic> json) {
    score = json['score'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['score'] = this.score;
    return data;
  }
}
